<template>
	<DataList :filter-form="innerFilter" @item-click="onItemClick" />
</template>
<script>
import { computed } from 'vue'
import DataList from './DataList.vue'
export default {
	name: 'FacilityCheckList',
	components: { DataList },
	props: {
		filterForm: { type: Object, default: () => ({}) },
		dataCategory: { type: String, default: '' }, // 废水/废气/固危废/中水
	},
	emits: ['item-click'],
	setup(props, { emit }) {
		const innerFilter = computed(() => ({
			...props.filterForm,
			dataLabel: '设施点检',
			dataCategory: props.dataCategory || '',
		}))
		console.log('FacilityCheckList 内部过滤条件:', innerFilter.value)
		const onItemClick = (item) => emit('item-click', item)
		return { innerFilter, onItemClick }
	},
}
</script>
